import request from '@/utils/request'

// 创建摄像头列
export function createList(data) {
  return request({
    url: '/video/list/create',
    method: 'post',
    data: data
  })
}

// 创建摄像头列
export function createLists(datas) {
  return request({
    url: '/video/list/creates',
    method: 'post',
    data: datas
  })
}

// 更新摄像头列
export function updateList(data) {
  return request({
    url: '/video/list/update',
    method: 'put',
    data: data
  })
}

// 删除摄像头列
export function deleteList(id) {
  return request({
    url: '/video/list/delete?id=' + id,
    method: 'delete'
  })
}

// 获得摄像头列
export function getList(id) {
  return request({
    url: '/video/list/get?id=' + id,
    method: 'get'
  })
}

// 获得摄像头列分页
export function getListPage(query) {
  return request({
    url: '/video/list/page',
    method: 'get',
    params: query
  })
}

// 导出摄像头列 Excel
export function exportListExcel(query) {
  return request({
    url: '/video/list/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
